package com.tangl.demo.map;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;
import java.util.Map;

/**
 * Map replace方法
 *
 * @author: TangLiang
 * @date: 2021/5/10 10:32
 * @since: 1.0
 */
@SpringBootTest
public class replace {
    @Test
    void replaceTest() {
        Map<String, String> map = new HashMap<>();
        map.put("aaa", "2021-1-01.0");
        map.replace("aaa", map.get("aaa").replace(".0", ""));
        System.out.println(map);
    }
}
